<?php

/**
 * Facebook Plugin
 * A Brightcove component for CakePHP : <http://www.cakephp.org/>
 * 
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @copyright		Copyright (c)	2009, Michael DePuy.
 * @link			http://www.apswerve.com
 * @package			facebook-plugin
 * @license			http://www.opensource.org/licenses/mit-license.php The MIT License
 */

 /**
  * This component is used to modify and record FacebookActions
  */
 class BrightcoveClientComponent extends Object {
 	
	var $driver;
 			
	function getRecentlyAdded($limit=10) {	
		$params = array( 'sort_by' => 'PUBLISH_DATE', 'sort_order' => 'DESC', 'page_size' => $limit);
		$videos = $this->driver->find('all_videos', $params);
		$recent = array();
		foreach($videos as $bv) {
			print_r($bv);
			echo "<hr>";
			array_push($recent, $bv);
		}
		
		return $recent;
	}
	
 }
